import request from '@/utils/request'

export default {
  getDictList(params) {
    return request({
      url: '/system/dict/list',
      method: 'get',
      params: params
    })
  },
  createDict(data) {
    return request({
      url: '/system/dict/create',
      method: 'post',
      data
    })
  },
  updateDict(data) {
    return request({
      url: `/system/dict/update/${data.id}`,
      method: 'put',
      data
    })
  },
  deleteDict(data) {
    return request({
      url: `/system/dict/delete`,
      method: 'delete',
      data
    })
  },
  getDictDetailList(params) {
    return request({
      url: '/system/dict/detail/list',
      method: 'get',
      params: params
    })
  },
  createDictDetail(data) {
    return request({
      url: '/system/dict/detail/create',
      method: 'post',
      data
    })
  },
  updateDictDetail(data) {
    return request({
      url: `/system/dict/detail/update/${data.id}`,
      method: 'put',
      data
    })
  },
  deleteDictDetail(data) {
    return request({
      url: `/system/dict/detail/delete`,
      method: 'delete',
      data
    })
  }
}
